package com.heima.mapper;

import com.heima.pojo.GoodsClassName;
import com.heima.pojo.GoodsClassQueryParam;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

import java.util.List;

@Mapper
public interface GoodsClassMapper {



    List<GoodsClassName> getgoodsClasslist(GoodsClassQueryParam pram);
    @Select("select * from tb_sku_class where class_id = #{id}")
    GoodsClassName selectById(String id);
    @Update("update tb_sku_class set class_name = #{className} where class_id = #{classId} ;")
    int upDateClassName(String classId,String className);
    @Select("select * from tb_sku_class where class_name = #{className}")
    GoodsClassName selectByClassName(String className);
    @Delete("delete from tb_sku_class where class_id = #{classId}")
    void deleteClassName(String classId);
}
